<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>后台主界面</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<link rel="stylesheet" href='<?php echo $static_url; ?>common/css/admin.css' type="text/css" />
<script src="<?php echo $static_url; ?>common/js/jquery-1.8.3.min.js" type="text/javascript"></script>
<script src="<?php echo $static_url; ?>common/js/common.js" type="text/javascript"></script>

<link rel="stylesheet" href='<?php echo $static_url; ?>common/css/daily_record.css' type="text/css" />
<link rel="stylesheet" href='<?php echo $static_url; ?>common/css/news_add.css' type="text/css" />
</head>
<body class="body_background">
	<div>
		<?php echo $header_nav; ?>
		
		<div class="common_container clearfix">
			<div class="crumbs">
				<span class="catalogue">统计代码管理</span>
				<a href="/www/admin/analytic_code/code_lists.php">列表</a> |
				<a href="/www/admin/analytic_code/add_code.php">添加</a>
			</div>
			<div class="daily_record_menu" id="side_container">
				<div class="closeSidebar"><i title="点击隐藏左菜单" class="icon_close"></i></div>
				<ul class="record_menu">
					<li style="font-size:14px;">统计代码列表</li>
					<?php foreach($analytic_codes_rs as $analytic_code): ?>
						<li><a href="/www/admin/analytic_code/edit_code.php?id=<?php echo $analytic_code['id']; ?>">
							 └ <?php echo $analytic_code['title']; ?></a>
						</li>
					<?php endforeach; ?>
				</ul>
			</div>
			<div class="sidebar_container_hidden" style="margin-top:10px;margin-right:5px;"  >
				<div class="openSidebar"><i title="点击显示左菜单" class="icon_open"></i></div>
			</div>
			<div class="daily_record_main" id="main_container">
				<table class="record_tips"><tr><td>编辑统计代码&nbsp;&gt;&nbsp;<?php echo $rs['title']; ?></td></tr></table>
				<form action="/www/admin/analytic_code/do/do_edit.php" method="post" onsubmit="return do_submit();">
				<table class="news_add_table">
					<tbody>
						<tr>
							<td class="tleft w100">
								<span style="color:#f00;">*</span>
								<span class="fontWeight">标题</span>
							</td>
							<td>
								<input type="text" class="ipt_wid415" name="title" id="title" value="<?php echo $rs['title']; ?>" />
								<input type="hidden" name="id" value="<?php echo $rs['id']; ?>" >
							</td>
						</tr>
						<tr>
							<td class="tleft w100">
								<span style="color:#f00;">*</span>
								<span class="fontWeight">代码</span>
							</td>
							<td>
								<textarea style="width:800px;height:200px;" name="code" id="code"><?php echo h_d($rs['code']); ?></textarea>
							</td>
						</tr>
						<tr>
							<td class="tleft w100">
								<span class="fontWeight">排序</span>
							</td>
							<td>
								<input style="height:25px;width:50px;" type="text" name="orders" value="<?php echo $rs['orders']; ?>"/>
							</td>
						</tr>
						<tr><td>&nbsp;</td><td>&nbsp;</td></tr>
						<tr>
							<td>&nbsp;</td>
							<td><input type="submit" value="提交" style="height:25px;"></td>
						</tr>
						<tr><td>&nbsp;</td><td>&nbsp;</td></tr>
					</tbody>
				</table>
				</form>
			</div>
		</div>
	</div>
<script>
//提交检测
function do_submit(){
	if( $('#title').val() == '' ){
		alert('请输入标题');
		$('#title').focus();
		return false;
	}else if( $('#code').val() == '' ){
		alert('请输入统计代码');
		$('#code').focus();
		return false;
	}else{
		return true;
	}
}
</script>
</body>
</html>